home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / nos042_s / slip.h < prev    next >
C/C++ Source or Header  |  1994-09-16  |  2KB  |  68 lines

  1. /*
  2.     -----------------------------------------------------
  3.     ATARI Version by David Nash - dnash@chaos.demon.co.uk
  4.  
  5.     Added __stdargs asy_rx
  6.     -----------------------------------------------------
  7. */
  8.  
  9. #ifndef    _SLIP_H
  10. #define    _SLIP_H
  11.  
  12. #ifndef    _GLOBAL_H
  13. #include "global.h"
  14. #endif
  15.  
  16. #ifndef _IFACE_H
  17. #include "iface.h"
  18. #endif
  19.  
  20. #ifndef _SLHC_H
  21. #include "slhc.h"
  22. #endif
  23.  
  24. #define SLIP_MAX 5        /* Maximum number of slip channels */
  25.  
  26. /* SLIP definitions */
  27. #define    SLIP_ALLOC    100    /* Receiver allocation increment */
  28.  
  29. #define    FR_END        0300    /* Frame End */
  30. #define    FR_ESC        0333    /* Frame Escape */
  31. #define    T_FR_END    0334    /* Transposed frame end */
  32. #define    T_FR_ESC    0335    /* Transposed frame escape */
  33.  
  34. /* Slip protocol control structure */
  35. struct slip {
  36.     struct iface *iface;
  37.     char escaped;        /* Receiver State control flag */
  38. #define SLIP_FLAG    0x01        /* Last char was a frame escape */
  39. #define SLIP_VJCOMPR    0x02        /* TCP header compression enabled */
  40.     struct mbuf *rbp_head;    /* Head of mbuf chain being filled */
  41.     struct mbuf *rbp_tail;    /* Pointer to mbuf currently being written */
  42.     char *rcp;        /* Write pointer */
  43.     int16 rcnt;        /* Length of mbuf chain */
  44.     struct mbuf *tbp;    /* Transmit mbuf being sent */
  45.     int16 errors;        /* Receiver input errors */
  46.     int type;        /* Protocol of input */
  47.     int (*send) __ARGS((int,struct mbuf *));    /* send mbufs to device */
  48.     int (*get) __ARGS((int));    /* fetch input chars from device */
  49.     struct slcompress *slcomp;    /* TCP header compression table */
  50. };
  51.  
  52. /* In slip.c: */
  53. extern struct slip Slip[];
  54.  
  55. #ifndef ATARI
  56. void asy_rx __ARGS((int xdev,void *p1,void *p2));
  57. #else
  58. void __stdargs asy_rx (int xdev, void *p1, void *p2);
  59. #endif
  60.  
  61. void asytxdone __ARGS((int dev));
  62. int slip_raw __ARGS((struct iface *iface,struct mbuf *data));
  63. int slip_send __ARGS((struct mbuf *bp,struct iface *iface,int32 gateway,int prec,
  64.     int del,int tput,int rel));
  65. void slip_status __ARGS((struct iface *iface));
  66.  
  67. #endif    /* _SLIP_H */
  68.